"""Default configuration

Use env var to override
"""
import os

ENV = os.getenv("FLASK_ENV")
DEBUG = ENV == "development"
# SECRET_KEY = os.getenv("SECRET_KEY")
# SQLALCHEMY_DATABASE_URI = os.getenv("DATABASE_URI")
# SQLALCHEMY_TRACK_MODIFICATIONS = False

# CELERY = {
#     "broker_url": os.getenv("CELERY_BROKER_URL"),
#     "result_backend": os.getenv("CELERY_RESULT_BACKEND_URL"),
# }


SECRET_KEY = "fhj123666"

# SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:qiuwen123666@1.15.241.228:3306/ppp_flask_faster?charset=utf8mb4"
SQLALCHEMY_DATABASE_URI = "postgresql://postgres:qiuwen123456@139.9.223.116/postgres"
# SQLALCHEMY_DATABASE_URI = "sqlite:///c:/absolute/path/to/database"
SQLALCHEMY_TRACK_MODIFICATIONS = False
# SQLALCHEMY_ECHO = True
CELERY = {
    "broker_url": "redis://localhost:6379/0",
    "result_backend": "redis://localhost:6379/1",
}



UPLOAD_PATH = os.path.join(os.getcwd(), "uploads")
if not os.path.exists(UPLOAD_PATH):
    os.makedirs(UPLOAD_PATH)

JWT_SECRET_KEY = 'me1UMiUFhSUjqxSs'

JWT_ACCESS_TOKEN_EXPIRES = 3600 * 24 * 30  # 过期时间1小时

WHITE_URL_LIST = [
    ""
]
